/*  1:   */ package com.rinsi.app.azsb.azzl.azzjxx;
/*  2:   */ 
/*  3:   */ import com.rinsi.core.CoreCache;
/*  4:   */ import com.rinsi.core.service.CoreSimpleService;
/*  5:   */ import com.rinsi.util.AssertUtil;
/*  6:   */ import com.rinsi.util.ListUtil;
/*  7:   */ import com.rinsi.util.MapUtil;
/*  8:   */ import java.util.List;
/*  9:   */ import java.util.Map;
/* 10:   */ import org.mybatis.spring.SqlSessionTemplate;
/* 11:   */ import org.springframework.stereotype.Service;
/* 12:   */ 
/* 13:   */ @Service
/* 14:   */ public class AzZjxxService
/* 15:   */   extends CoreSimpleService
/* 16:   */ {
/* 17:   */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/* 18:   */   {
/* 19:20 */     Map<String, Object> params = getParams(model);
/* 20:   */     
/* 21:22 */     Map<String, Object> config = getConfig(model);
/* 22:   */     
/* 23:24 */     rMap.put("kjmc", getSqlSessionTemplate().selectOne(namespace(config) + ".getKJMC", params));
/* 24:   */     
/* 25:   */ 
/* 26:27 */     List<Map<String, Object>> modules = CoreCache.getCacheList(MapUtil.getString(params, "UID"), "modules");
/* 27:   */     
/* 28:29 */     List<Map<String, Object>> sub_rights = ListUtil.subList(modules, "MODULE_NO_PRE='500007'");
/* 29:   */     
/* 30:31 */     rMap.put("azsbxx", getSqlSessionTemplate().selectOne("azsb.get", params));
/* 31:   */     
/* 32:33 */     rMap.put("userxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "user"));
/* 33:   */     
/* 34:35 */     model.put("sub_rights", ListUtil.listToMap(sub_rights, "MODULE_TYPE"));
/* 35:   */     
/* 36:37 */     model.put("azsbZjxx", getSqlSessionTemplate().selectOne(namespace(config) + ".get", params));
/* 37:   */   }
/* 38:   */   
/* 39:   */   public Map<String, Object> synData(Map<String, Object> model)
/* 40:   */   {
/* 41:50 */     Map<String, Object> params = getParams(model);
/* 42:   */     
/* 43:52 */     Map<String, Object> config = getConfig(model);
/* 44:   */     
/* 45:54 */     Map<String, Object> rMap = getRMap();
/* 46:   */     try
/* 47:   */     {
/* 48:58 */       getSqlSessionTemplate().insert(namespace(config) + ".synData", params);
/* 49:   */     }
/* 50:   */     catch (Exception ex)
/* 51:   */     {
/* 52:62 */       rMap.put("success", Boolean.valueOf(false));
/* 53:64 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/* 54:66 */         rMap.put("message", ex.getMessage());
/* 55:   */       } else {
/* 56:70 */         rMap.put("message", "保存数据出错！请稍后重试，或联系系统管理员！");
/* 57:   */       }
/* 58:73 */       rMap.put("ex", ex.getMessage());
/* 59:   */       
/* 60:75 */       ex.printStackTrace();
/* 61:   */     }
/* 62:78 */     if (!AssertUtil.isStringNotEmpty(params.get(config.get("module.idCol")))) {
/* 63:80 */       afterInsert(model, rMap);
/* 64:   */     } else {
/* 65:84 */       afeterUpdate(model, rMap);
/* 66:   */     }
/* 67:87 */     return rMap;
/* 68:   */   }
/* 69:   */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.azsb.azzl.azzjxx.AzZjxxService
 * JD-Core Version:    0.7.0.1
 */